package com.lcifn.middleware.rpc.transport;

import java.io.Closeable;
import java.net.SocketAddress;
import java.util.concurrent.TimeoutException;

/**
 * 传输客户端接口
 * @author lichao
 * @date 2021/1/6 17:20
 */
public interface TransportClient extends Closeable {

    /**
     * 创建传输服务通道
     * @param socketAddress socket地址
     * @param connectionTimeout 连接超时时间
     * @return
     */
    Transport createTransport(SocketAddress socketAddress, int connectionTimeout) throws TimeoutException, InterruptedException;

}
